<?php

namespace App\Traits\GetModel;

use App\Models\Other\Express\ExpressCompanyModel;
use App\Models\Store\Ranch\RanchModel;
use App\Models\Store\User\UserApplyRecordsModel;
use App\Models\Store\User\UserIdCardModel;
use App\Models\Store\User\UserModel;
use Exception;

trait GetStoreUserTrait
{
    /**
     * @return UserModel
     * @throws Exception
     */
    public function getStoreUserModel(): UserModel
    {
        return loadModel('Store\User\UserModel');
    }

    /**
     * @return UserIdCardModel
     * @throws Exception
     */
    public function getStoreUserIdCardModel(): UserIdCardModel
    {
        return loadModel('Store\User\UserIdCardModel');
    }

    /**
     * @return RanchModel
     * @throws Exception
     */
    public function getStoreRanchModel(): RanchModel
    {
        return loadModel('Store\Ranch\RanchModel');
    }

    /**
     * @return ExpressCompanyModel
     * @throws Exception
     */
    public function getExpressCompanyModel(): ExpressCompanyModel
    {
        return loadModel('Other\Express\ExpressCompanyModel');
    }

    /**
     * @return UserApplyRecordsModel
     * @throws Exception
     */
    public function getUserApplyRecordsModel(): UserApplyRecordsModel
    {
        return loadModel('Store\User\UserApplyRecordsModel');
    }
}
